package com.cn.wanxi.service.impl;

import com.cn.wanxi.dao.IFacebookDao;
import com.cn.wanxi.dao.impl.FacebookDaoImpl;
import com.cn.wanxi.model.FacebookModel;
import com.cn.wanxi.service.IFacebookService;

import java.util.List;

public class FacebookServiceImpl implements IFacebookService {
    IFacebookDao facebookDao = new FacebookDaoImpl();
    @Override
    public int deleteFacebook(int id) {
        return facebookDao.deleteFacebook(id);
    }

    @Override
    public List<FacebookModel> getFacebookList() {
        return facebookDao.getFacebookList();
    }

    @Override
    public FacebookModel getFacebook(int id) {
        return facebookDao.getFacebook(id);
    }

    @Override
    public List<FacebookModel> searchFacebook(String sql) {
        return facebookDao.searchFacebook(sql);
    }

    @Override
    public List<FacebookModel> getFacebookList(int page, int size) {
        return facebookDao.getFacebookList(page,size);
    }

    @Override
    public List<FacebookModel> getFacebookList(int page, int size, String sort) {
        return facebookDao.getFacebookList(page,size,sort);
    }

    @Override
    public long getFacebookCount() {
        return facebookDao.getFacebookCount();
    }

    @Override
    public int addFacebook(FacebookModel facebookModel) {
        return facebookDao.addFacebook(facebookModel);
    }
}
